import request from '@/utils/request'

// 获取用户未读通知数量
export function getUnreadCount() {
  return request({
    url: '/notifications/unread/count',
    method: 'get'
  })
}

// 获取用户通知列表
export function getNotificationList(params) {
  return request({
    url: '/notifications',
    method: 'get',
    params
  })
}

// 标记通知为已读
export function markAsRead(notificationId) {
  return request({
    url: `/notifications/${notificationId}/read`,
    method: 'put'
  })
}

// 标记所有通知为已读
export function markAllAsRead() {
  return request({
    url: '/notifications/read/all',
    method: 'put'
  })
}

// 删除通知
export function deleteNotification(notificationId) {
  return request({
    url: `/notifications/${notificationId}`,
    method: 'delete'
  })
} 